package com.baibei.model;

import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;

import java.io.Serializable;
import java.util.List;

/**
 * Created by tang on 2018/7/19.
 */

public class MsgInfo implements DateInfo ,Parcelable,Serializable {
    //日期
    private String createdTime;
//    //时间点
//    private String dtime;
//    //标题
//    private String title;
//    //具体消息内容
//    private String message;
//    //返回消息图片标识
//    private String state;
    private List<MsgContentInfo> obj;

    protected MsgInfo(Parcel in) {
        createdTime = in.readString();
        obj = in.createTypedArrayList(MsgContentInfo.CREATOR);
    }

    public static final Creator<MsgInfo> CREATOR = new Creator<MsgInfo>() {
        @Override
        public MsgInfo createFromParcel(Parcel in) {
            return new MsgInfo(in);
        }

        @Override
        public MsgInfo[] newArray(int size) {
            return new MsgInfo[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(createdTime);
        parcel.writeTypedList(obj);
    }

    @Override
    public long getDate() {
        return 0;
    }

    public String getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }

    public List<MsgContentInfo> getObj() {
        return obj;
    }

    public void setObj(List<MsgContentInfo> obj) {
        this.obj = obj;
    }

    @Override
    public String toString() {
        return "MsgInfo{" +
                "createdTime='" + createdTime + '\'' +
                ", obj=" + obj +
                '}';
    }
}
